home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
laser4up.arc
/
LASER4UP.DOC
< prev
next >
Wrap
Text File
|
1989-03-28
|
7KB
|
145 lines
LASER4UP.COM
Command
Original LASERLST program by
Michael Holmes and Bob Flanders
1989 No. 7 (Utilities)
LASER4UP created from modified LASERLST code by
Bob White 3/28/89
CID 71121,2333
Purpose: Formats text files so that four pages from the file may be
printed on a single landscape 8.5x11-inch page on a HP LaserJet or
compatible printer. The program creates a disk file containing the text
to be printed on the back sides of the page. The front pages must be
sorted into original order, reinserted into the paper tray upside down,
and then the disk file is copied to the printer.
Format: [d:][path]LASER4UP infile [outfile] [/Tn]
Remarks: The infile parameter designates the text file(s) to be
printed. DOS "wildcards" (* and ?) can be used to designate multiple
files, and a drive and path may also be included as part of infile.
By default, LASER4UP sends its output to the standard DOS printing
device, which is normally LPT1:. The optional outfile parameter can be
used to direct the output either to another DOS device (e.g., LPT2:), or
to a disk file instead. The optional /Tn switch causes each tab character
(ASCII 9) in the infile to be replaced in the outfile with n spaces. The
default value of n is 8; other values up to 16 may be used.
The outfile produced by LASER4UP contains the requisite formatting
and printing Escape sequences used by the HP LaserJet series printers.
The infile is printed in landscape mode with four 66-line x 81-character
pages on each physical page. Files suitable for processing by LASER4UP
should be ASCII files that do not contain Escape sequences of their own
and that do not require any specific word processor's formatting codes.
Underlining produced by a backspace and character overstrike is supported,
however. LASER4UP may be used with files whose line lengths exceed 81
characters if it is understood that lines will be wrapped automatically at
their 82nd character and that no provision is made for word wrap.
LASER4UP is especially suitable for printing program listings, readme
files, and rough drafts of text to be edited.
LASER4UP does not differ from LASERLST in its basic operation. LASER4UP
also supports tab expansion and re-directing output to disk just as
described above. The difference comes in what is in each file. LASER4UP
always creates a file in the current directory called "LASER4UP.TXT".
This contains all the codes and output to be printed on the back sides of
each page. As I said, this file is ALWAYS created. If you redirect the
output from the (default) printer to a disk file of your own naming, it
will just contain the codes and text to appear on the front sides of the
page. For example, the output from a file will be handled as follows:
Physical Paper Page Printer or File LASER4UP.TXT
------------------- --------------- ------------
1 1, 2 3, 4
2 5, 6 7, 8
3 9, 10 11, 12
4 13, 14 15, 16
etc.
Assuming you didn't redirect the output to a file, your LaserJet would
start printing and print pages 1, 2, 5, 6, 9, 10, 13, 14, and so on, to
the end of the file. You would then need to remove the paper from the
output tray and resort it so that the page containing pages 1 & 2 is on
top, followed by 5 & 6, and so on. Put these pages back in the paper tray
with the UNPRINTED side up. Once the tray is back in the printer, use the
following DOS command to print pages 3, 4, 7, 8, etc.:
COPY LASER4UP.TXT PRN
Replace PRN as appropriate if you've redirected your LaserJet to some
other device. The printer should start printing and print pages 3, 4, 7,
8, 11, 12, etc. on the backs of the previously printed pages. Voila!
You've done it! I suppose it takes a bit of getting used to, but it sure
does cut down on the paper you use to print documentation or program listings!
Note: The program DOES maintain track of where it is and will output
formfeeds as appropriate to keep multiple file listings on the right
pages. This allows you to use wild cards and still get your files printed
correctly. Of course, I make no guarantees if you don't get the paper
sorted correctly - there's only so much I can do! Try it a couple of
times with some small files - it does work!
CAVEAT EMPTOR
-------------
The above is Latin for "Let the buyer beware." Keep in mind the paper
manipulation would be difficult if the LaserJet is networked and you can't
control when anyone else is sending output to it. You may have to save
print for a time when you can be relatively certain of having the printer
to yourself. If the LaserJet is dedicated to your PC, you don't have to
worry about this.
Remember to delete LASER4UP.TXT after you're through with it. I recommend
a batch file similar to:
Echo Off
LASER4UP %1 %2 %3
ECHO:
ECHO Sort the output, then press ENTER to print the back sides or
ECHO press CTRL-C to cancel.
ECHO:
PAUSE
COPY LASER4UP.TXT PRN > NUL
ECHO:
ECHO Delete LASER4UP.TXT? Any key deletes it, CTRL-C keeps it.
ECHO:
PAUSE
DEL LASER4UP.TXT > NUL
It's not pretty, but it would keep your hard disk from getting cluttered
with copies of LASER4UP.TXT. They can get large, as there's lots of stuff
in them! Again, the above might have to be modified if you've got your
LaserJet connected as some other device.
I suppose you'd have to re-print everything if the printer jammed, but
you'd probably have to do that, anyway. With LASER4UP, you're using less
paper to start out with, so if it jams and you have to re-do it, you're no
worse off than if you'd used LASERLST to begin with. (If the printer jams
while LASERLST is printing, you'll still probably have to start over,
anyway.) I've only had my LaserJet II jam a couple of times in the two
years I've been using it, so jams aren't going to be a big problem, unless
you bend the paper before you insert it.
An alternative approach to producing the same results as what I've done by
creating a disk file would be to have modified the program to have sent
half the output to the NUL device - i.e., thrown it away. That would have
meant adding a switch to the program to tell it which half to send to the
printer and which half to throw away. It would have had the advantage of
not creating the disk file, but you would have had to run through the
entire input file(s) twice to get everything. It would have been time
consuming on slower PCs. I figured if you had a text file that large, you
probably had a hard disk anyway, and if it was so full as to not have room
for another copy of the input files, you had other problems. If you don't
have a hard disk, I recommend the upgrade!
Comments or suggestions are welcome. Contact me through CompuServe ID
71121,2333 or Exec-PC (414) 964-5160, mail to Bob White.